/*
 * jQuery OuterHtml Plugin
 * version: 1.0.1 (July 1, 2011)
 *
 * Copyright (c) Takashi Yoshizawa
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($){
	$.fn.outerHtml = function(value)
	{
		if(value)
		{
			return this.before(value).remove();
		} else {
			return this.clone().wrapAll('<div/>').parent().html();
		}
	}
})(jQuery);